package model;

public class DiscountFactory  {

	private static DiscountFactory instance = new DiscountFactory();
	
	
	private DiscountFactory(){
		
	}
	
	public static DiscountFactory instance(){
		return instance;
	}
	
	public IDiscountStrategy createDiscount (Student student) {
		IDiscountStrategy discountStrategy = null;
		if(student instanceof FreeStudent){
			discountStrategy = new FreeStudentDiscount();
		}else if(student instanceof RetrainingStudent){
			discountStrategy = new RetrainingStudentDiscount();
		}
		return discountStrategy;
		
	}
}